<?php
class Computer {
	public $cpu = 'amd 5000';
	public $mainboard = '华硕 9000x';
	private $hd = 512;

	public function game($gameName=''){
		if($this->getHdSize()<1024){
			echo "硬盘太小玩不了游戏";
			return false;
		}
		echo $this->hd;
	}
	public function job($work='写代码'){
		echo $this->game();
	}
	private function getHdSize(){
		return $this->hd;
	}
}

$computer = new Computer();
var_dump($computer->game());